//
//  BRBaseViewController.h
//  BrezzeSaaS
//
//  Created by IOS on 2021/8/31.
//  Copyright © 2021 Brezze GWG. All rights reserved.
//

#import <QMUIKit/QMUIKit.h>
#import "MJRefresh.h"
#import "BRNavView.h"
NS_ASSUME_NONNULL_BEGIN

@interface BRBaseViewController : QMUICommonViewController
/// 自定义导航view
@property (nonatomic,strong) BRNavView *navView;

- (void)popVC:(BOOL)animated;

- (void)dismissVC:(BOOL)animated;

- (void)pop;

- (void)dismiss;
/// 设置tableView显示安全 距离
- (void)tableViewAdjustmentNever;
/// 添加block
- (void)br_blockAction;
/// 添加通知
- (void)br_addNoti;

- (UIView *)createTop:(NSString *)title;
- (UIView *)createTop:(NSString *)title backColor:(UIColor *)color;
/// 无背景导航，需隐藏原本导航栏preferredNavigationBarHidden
- (UIView *)createTop:(NSString *)title imageStr:(NSString *)imgStr;
- (UIView *)createTop:(NSString *)title imageStr:(NSString *)imgStr backColor:(UIColor *)color;

- (BRNavView *)br_createTop:(NSString *)title;
- (BRNavView *)br_createTop:(NSString *)title imageRStr:(NSString *)rImage;
- (BRNavView *)br_createTop:(NSString *)title backColor:(UIColor *)color;
/// 无背景导航，需隐藏原本导航栏preferredNavigationBarHidden
- (BRNavView *)br_createTop:(NSString *)title imageStr:(NSString *)imgStr;
/// 无背景导航，需隐藏原本导航栏preferredNavigationBarHidden
- (BRNavView *)br_createTop:(NSString *)title imageStr:(NSString *)imgStr backColor:(UIColor *)color;

@property (nonatomic,copy) BRVoidBlock leftClickBlock;
@property (nonatomic,copy) BRVoidBlock rightClickBlock;
/// 展示空视图
- (void)showBREmptyView;

/// 展示网络错误视图
- (void)showBRErrorView;
/// 展示空视图
- (void)showBREmptyView:(UIScrollView *)aView;
/// 展示网络错误视图
- (void)showBRErrorView:(UIScrollView *)aView;

#pragma mark - 下拉刷新、加载更多
- (MJRefreshStateHeader *)addRefreshActionForView:(UIScrollView *)aView;

- (MJRefreshFooter *)addLoadMoreActionForView:(UIScrollView *)aView;

- (void)handleListRefreshAction;

- (void)handleListLoadMoreAction;

- (void)handleEndRefreshForView:(UIScrollView *)aView;

- (void)handleEndRefreshForViewWithNoMoreData:(UIScrollView *)aView;

@property (nonatomic,assign) NSInteger tableType;
@property (nonatomic,strong) QMUITableView *tableView;

@property (nonatomic,strong) BREmptyView *emptyLYView;
@property (nonatomic,strong) BREmptyView *netErrorView;

@property (nonatomic,strong) UIColor *titleColor;
@property (nonatomic,strong) NSString *titleStr;

@end

NS_ASSUME_NONNULL_END
